var dClickTime=600;
var clickTimes=[{"name":"a1","time":0},{"name":"a2","time":0},{"name":"a3","time":0},
	{"name":"a4","time":0},{"name":"a5","time":0},{"name":"a6","time":0}]; 

function dClick(obj,name){ 
    	//debugger;
		console.log("click name:" + name )
    	var time = Date.now();
    	for(var i=0;i<clickTimes.length;i++){ 
    		if(clickTimes[i]["name"] == name ){
    			if(clickTimes[i]["time"]==0){
    				clickTimes[i]["time"] = time;
    				console.log("1 click time 1:"+ time);
    			}else{
    				console.log("2 click time 2:"+ time+",gap:"+(time - clickTimes[i]["time"]));
    				if(time - clickTimes[i]["time"] < dClickTime){ 
    					console.log(" is double click , set to empty");
    					obj.value = "";
    					clickTimes[i]["time"] = 0;
    				}else{
						console.log("restart 1 click time 1:"+ time);
    					clickTimes[i]["time"] = time ; 
    				} 
    			}
    			break;
    		}
    	} 
    }
	
	